<template>
	<view class="main">
		<view class="head">
			<view class="head-info">
				<image src="@/static/icon2/g.png" mode="aspectFill"></image>
				<text>{{title}}</text>
			</view>
			<view class="info">{{info}}</view>
		</view>
		<view class="content">
			<view class="trangle"></view>

			<view class="fabu-button" @click="openPage(url)">{{buttonTitle}}</view>
		</view>

		<!-- <kefu v-if="isShowKefu" @closePage="closePage()"></kefu> -->
	</view>
</template>

<script>
	import {
		getUserInfo
	} from '@/libs/unit.js'
	import kefu from '../../components/xjbg/kefu.vue'
	export default {
		props: {
			title: {
				type: String,
				default: '成功'
			},
			buttonTitle: {
				type: String,
				default: '查看'
			},
			url: {
				type: String,
				default: '/pages/my-job/boss-my-job-new'
			},
			info: {
				type: String,
				default: ''
			},
		},
		data() {
			return {
				isShowKefu: false,
			}
		},
		components: {
			kefu,
		},
		methods: {
			pageInit() {},
			openPage(url) {
				if(this.buttonTitle=='返回首页'){
					console.log('来到这里1')
					
					uni.switchTab({
						url: '/pages/index/index'
					});
				}else{
					uni.redirectTo({
						url: url
					})
				}
				
			},
			closePage() {
				this.$emit('closePage')
			},
		},
		onLoad(value) {
			// this.pageInit()
		},
		// onNavigationBarButtonTap() {
		// 	this.isShowKefu = true
		// },
	}
</script>

<style lang="less" scoped>
	.head {
		width: 750rpx;
		height: 280rpx;
		background: #FCC928;
	}

	.content {
		width: 750rpx;
		margin-top: -20rpx;
		background: #FFFFFF;
		border-radius: 25rpx 25rpx 0 0;
		height: calc(100vh - 320rpx + 44px);
	}

	.trangle {
		width: 0px;
		height: 0px;
		border: 20rpx solid #FCC928;
		border-bottom-color: transparent;
		border-left-color: transparent;
		border-right-color: transparent;
		margin: 0 auto;
	}




	.mask {
		width: 100vw;
		height: 100vh;
		background-color: rgba(0, 0, 0, .5);
		position: fixed;
		top: 0;
		left: 0;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.alert_model {
		width: 550rpx;
		height: 306rpx;
		background: #FFFFFF;
		border-radius: 12rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: center;
	}

	.alert_model-title {
		font-size: 36rpx;
		font-weight: bold;
		color: #000000;
		margin-top: 60rpx;
	}

	.alert_model-content {
		font-size: 32rpx;
		font-weight: 500;
		color: #787878;
		flex: 1;
		margin-top: 40rpx;
	}

	.alert_model-button {
		height: 80rpx;
		border-top: 1rpx solid #BDBDBD;
		display: flex;
		justify-content: space-between;
	}

	.alert_model-button-quxiao {
		width: 274rpx;
		height: 80rpx;
		border-right: 1rpx solid #BDBDBD;
		font-size: 32rpx;
		font-weight: 500;
		color: #787878;
		line-height: 80rpx;
		text-align: center;
	}

	.alert_model-button-queding {
		width: 275rpx;
		height: 80rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #4E9800;
		line-height: 80rpx;
		text-align: center;
	}

	.fabu-button {
		margin: 72rpx auto 0 auto;
		width: 690rpx;
		height: 88rpx;
		background: #FCC928;
		border-radius: 44rpx;
		font-size: 32rpx;
		font-weight: bold;
		color: #402110;
		line-height: 88rpx;
		text-align: center;
	}

	.head-info {
		padding-top: 48rpx;
		display: flex;
		justify-content: center;
		align-items: center;

		&>image {
			width: 48rpx;
			height: 48rpx;
		}

		&>text:nth-child(2) {
			margin-left: 18rpx;
			font-size: 32rpx;
			font-weight: 500;
			color: #402110;
			line-height: 45rpx;
		}
	}

	.info {
		text-align: center;
		margin-top: 48rpx;
		font-size: 24rpx;
		font-weight: 500;
		color: #402110;
		line-height: 45rpx;
	}
</style>
